import {
	createRouter,
	createWebHashHistory
} from 'vue-router'

import Login from "@/views/Login.vue" //登录

import myhead from "@/assets/logo.png" //图片导入

import Adm from "@/views/adm/Adm.vue" //管理员操作
import Adm_Clz from "@/views/adm/clz/Show.vue" //管理员  班级显示操作
import Adm_Course from "@/views/adm/course/Show.vue" //管理员  课程显示操作
import Adm_Stu from "@/views/adm/stu/Show.vue" //管理员  学生显示操作
import Adm_AddStu from "@/views/adm/stu/AddStu.vue"
import Adm_Tea from "@/views/adm/tea/Show.vue" //管理员  教师显示操作
import Adm_Task from "@/views/adm/task/Show.vue" //管理员  课程安排显示操作
import Adm_Head from "@/views/adm/Head.vue" //管理员  修改头像显示操作

import Stu from "@/views/stu/Show.vue" //学生  显示操作
import Stu_Course from "@/views/stu/Course.vue" //学生  查询课程
import Stu_Mark from "@/views/stu/Mark.vue" //学生  查询分数
import Stu_Pwd from "@/views/stu/Pwd.vue" //学生  修改密码 公用教师修改密码
import Stu_Head from "@/views/stu/Head.vue" //学生修改头像 公用教师修改头像


import Tea from "@/views/tea/Show.vue" //教师  显示操作
import Tea_GoMark from "@/views/tea/GoMark.vue" //教师  准备登分
import Tea_DoMark from "@/views/tea/DoMark.vue" //教师  登分
import Tea_Head from "@/views/tea/Head.vue" //教师  修改头像
import Tea_Pwd from "@/views/tea/Pwd.vue" //教师  修改密码
import Tea_MyTask from "@/views/tea/myTask.vue" //教师查询 自己课程安排


//定义路由表  # 后面路径 和组件形成一一对应关系
const routes = [{
		path: "/adm", //管理员
		component: Adm,
		children: [ //儿子类
			{
				path: "clz", //别写成 /clz
				component: Adm_Clz
			},
			{
				path: "course", //别写成 /clz
				component: Adm_Course
			},
			{
				path: "stu", //别写成 /clz
				component: Adm_Stu
			},
			{
				path:"addStu",
				component: Adm_AddStu
			},
			{
				path: "tea", //别写成 /clz
				component: Adm_Tea
			},
			{
				path: "task",
				component: Adm_Task

			}
		]
	},

	{
		path: "/stu",
		component: Stu,
		children: [{
				path: "course",
				component: Stu_Course,
			},
			{
				path: "mark",
				component: Stu_Mark,
			},
			{
				path: "pwd",
				component: Stu_Pwd,
			},
			{
				path: "head",
				component: Stu_Head,
			},

		]
	},


	{
		path: "/tea",
		component: Tea,
		children: [{
				path: "goMark",
				component: Tea_GoMark,
			},
			{
				path: "doMark",
				component: Tea_DoMark,
			},
			{
				path: "head",
				component: Tea_Head,
			},
			{
				path: "pwd",
				component: Tea_Pwd,
			},
			{
				path: "goMark",
				component: Tea_GoMark,
			},
			{
				path: "doMark",
				component: Tea_DoMark,
			},
			{
				path: "myTask",
				component: Tea_MyTask
			},
		]
	},
	{
		path: "/login",
		component: Login
	},

	{
		path: "/myhead",
		component: myhead
	},

];

//注册路由表  告诉 Vue-fouter 路由数组

const router = createRouter({
	history: createWebHashHistory(
		import.meta.env.BASE_URL),
	routes
})

//export 暴露出来
export default router
